import {requestService} from '/src/utils/request'

// 查询任务列表
export function listJob(query) {
    return requestService({
        url: '/xiaozhen-quartz/job/queryJob',
        method: 'get',
        params: query
    })
}


// 新增任务
export function addJob(data) {
    return requestService({
        url: '/xiaozhen-quartz/job/addJob',
        method: 'post',
        data: data
    })
}

// 修改任务
export function updateJob(data) {
    return requestService({
        url: '/xiaozhen-quartz/job/rescheduleJob',
        method: 'post',
        data: data
    })
}

// 删除任务
export function deleteJob(data) {
    return requestService({
        url: '/xiaozhen-quartz/job/deleteJob',
        method: 'post',
        data: data
    })
}

// 暂停任务
export function pauseJob(data) {
    return requestService({
        url: '/xiaozhen-quartz/job/pauseJob',
        method: 'post',
        data: data
    })
}

// 恢复任务
export function resumeJob(data) {
    return requestService({
        url: '/xiaozhen-quartz/job/resumeJob',
        method: 'post',
        data: data
    })
}
